// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import { sync } from 'vuex-router-sync'
import FastClick from 'fastclick'

import App from './App'
import router from './router'
import store from './store'
// import i18n from './i18n/vue-i18n';
import registerServiceWorker from './registerServiceWorker'

// import './i18n/vuex-i18n';
import './utils/directives'
import './utils/filters'

// 如果是 alpha:上线前测试，引入 vconsole 调试工具
if (process.env.CONFIG_ENV === 'alpha') {
  const VConsole = require('vconsole')
  new VConsole() // eslint-disable-line
}

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  // i18n,
  render: h => h(App),
})

FastClick.attach(document.body)
sync(store, router)
registerServiceWorker()
